package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.JrUserCatalogBuyMapper;
import com.education.wisdom.pojo.JrUserCatalogBuy;
import com.education.wisdom.service.JrUserCatalogBuyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 用户购买课程表 服务层实现
 *
 * @author d
 * @date 2020-07-23 13:31:56
 */
@Service
public class JrUserCatalogBuyServiceImpl implements JrUserCatalogBuyService {

    @Autowired
    private JrUserCatalogBuyMapper jrUserCatalogBuyMapper;

    //查询用户购买课程表信息
    @Override
    public JrUserCatalogBuy selectJrUserCatalogBuyById(String userid) {
        return jrUserCatalogBuyMapper.selectJrUserCatalogBuyById(userid);
    }

    // 查询用户购买课程表列表
    @Override
    public List<JrUserCatalogBuy> selectJrUserCatalogBuyList(JrUserCatalogBuy jrUserCatalogBuy) {
        return jrUserCatalogBuyMapper.selectJrUserCatalogBuyList(jrUserCatalogBuy);
    }

    // 新增用户购买课程表
    @Override
    public int insertJrUserCatalogBuy(JrUserCatalogBuy jrUserCatalogBuy) {
        return jrUserCatalogBuyMapper.insertJrUserCatalogBuy(jrUserCatalogBuy);
    }

    //修改用户购买课程表
    @Override
    public int updateJrUserCatalogBuy(JrUserCatalogBuy jrUserCatalogBuy) {
        return jrUserCatalogBuyMapper.updateJrUserCatalogBuy(jrUserCatalogBuy);
    }

    //删除用户购买课程表对象
    @Override
    public int deleteJrUserCatalogBuyByIds(String ids) {
        return jrUserCatalogBuyMapper.deleteJrUserCatalogBuyByIds(Convert.toStrArray(ids));
    }
}